public class Main {
    public static void zhizhen(int[] arr){
        if(arr.length==0 || arr==null) return ;
        int left=0;
        int right =arr.length-1;
        while(left<right){
            while(left<right && (arr[left] & 1)==1){
                left++;
            }while (left<right && (arr[right]&1)==0){
                right--;
            }
            if(left<right){
                int temp=arr[left];
                arr[left]=arr[right];
                arr[right]=temp;
            }
        }
    }
    public static void main(String[] args) {
        System.out.println("Hello world!");
        int []a={1,2,45,65,3,7,32,65};
        zhizhen(a);
        for (int x:a) {
            System.out.println(x);
        }

    }
}